﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace LiUTrading.Models
{
    public class AdFormViewModel
    {
        private static string[] _categories = new[]{
        "Books",
        "Bikes",
        "Furniture",
        "Services",
        "Tickets",
        "Other"
        };

        
        //Properties
        public Ad Ad{get;private set;}
        public SelectList Categories { get; private set; }

        //Constructor
        public AdFormViewModel(Ad ad){
            Ad = ad;
            Categories = new SelectList(_categories,ad.Category);
        }
    }
}